<f:if condition="{configuration.insertAbove}">
	<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if>

<f:renderChildren arguments="{contentArguments}" />

<f:if condition="{configuration.insertBelow}">
	<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if>

<f:section name="paginator">
	<div class="row-fluid page-nav-container">
		<div class="span8">
			<div class="page-nav">
				<f:for each="{pagination.pages}" as="page">
					<f:if condition="{page.isCurrent}">
						<f:then>
							<span class="active">
								{page.number}
							</span>
						</f:then>
						<f:else>
							<span>
								<f:if condition="{page.number} > 1">
									<f:then>
										<f:widget.link arguments="{currentPage: page.number}" addQueryStringMethod="{configuration.addQueryStringMethod}">{page.number}</f:widget.link>
									</f:then>
									<f:else>
										<f:widget.link addQueryStringMethod="{configuration.addQueryStringMethod}">{page.number}</f:widget.link>
									</f:else>
								</f:if>
							</span>
						</f:else>
					</f:if>
				</f:for>
			</div>
		</span>
		<div class="span4">
		  <div class="page-nav-info">Page {page.number} of {pagination.numberOfPages}</div>
		</div>
	</div>
</f:section>
